If a new notification is pushed (or the same is updated) in a very short
time GNOME shell may only show the last notification (or none).
This is because since commit
2801d0bf a notification that is about to
show (so in SHOWING state) may be considered expired, given that the
notification timeout won't be set until the show animation has
completed.
Thus, only consider the notification as expired when the notification is
in the shown state, but not in the showing one.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6529
Fixes: 2801d0bfe3 ("messageTray: Close SHOWING banner when its notification is destroyed")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3905>
} else if (this._notificationState === State.SHOWING ||
this._notificationState === State.SHOWN) {
let expired = (this._userActiveWhileNotificationShown &&
+ this._notificationState === State.SHOWN &&
this._notificationTimeoutId === 0 &&
this._notification.urgency !== Urgency.CRITICAL &&
!this._pointerInNotification) || this._notificationExpired;